package gamesolitaire;

import java.awt.image.BufferedImage;

public class Peg {
       
public static final int height = 50;
public static final int width = 50;
       
private static BufferedImage pegPic;
private static BufferedImage selectedPegPic;
private static BufferedImage emptyPic;
private static BufferedImage staticPic;
        
	/**constructor*/
	public Peg() {
	}
    /** Method sets  the Peg image*/
    public static void setPegPic(BufferedImage image) {
    	pegPic = image;
    }
    /** Method sets  the Peg image when selected*/
    public static void setSelectedPegPic(BufferedImage image) {
    	selectedPegPic = image;
    }
    /**Method sets  empty spot*/
    public static void setEmptyPic(BufferedImage image) {
    	emptyPic = image;
    }
    /**Method sets the unable to move to positions*/
    public static void setStaticPic(BufferedImage image) {
    	staticPic = image;
    }
    /** Returns the appropriate image for the specified piece type */
    public static BufferedImage getImage(int pieceType) {
    	switch (pieceType) {
    		case 1: return pegPic;
    		case 2: return selectedPegPic;
    		case 0: return emptyPic;
    			default: return staticPic;
                }
        }
}